<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo</title>

</head>

<body>


</body>
<script type="text/javascript">
let [x, y, z] = new Set(['a', 'b', 'c']);
console.log(x, y, z); // a b c

//迭代器的构造赋值
// function* fibs() {
//   let a = 0;
//   let b = 1;
//   while (true) {
//     yield a;
//     [a, b] = [b, a + b];
//   }
// }
// let [first, second, third, fourth, fifth, sixth, seventh] = fibs();
// console.log(first, second, third, fourth, fifth, sixth, seventh); // 0 1 1 2 3 5


// function f() {
//   console.log('aaa');
// }
// let [x = f()] = [];

// console.log(x); // 1
</script>

</html>